import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:get/get.dart';
import 'package:flutter_template/provider/index.dart';
import 'package:flutter_template/generated/i18n.dart';

class MainPage extends StatefulWidget {
  MainPage({Key key}) : super(key: key);
  @override
  _MainState createState() => _MainState();
}

class _MainState extends State<MainPage> {
  @override
  Widget build(BuildContext context) {
    return Consumer(
      builder: (BuildContext context, AppStatus status, Widget child) {
    return Scaffold(
      appBar: AppBar(
        title: Text(I18n.of(context).appName),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('You have pushed the button this many times'),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: (){
		  Navigator.pushNamed(context, '/system/setting');
		},
        tooltip: '跳下一个页',
        child: Icon(Icons.add),
      ),
    );
	  }
	);
  }
}
